package com.nhim.cms.admin.client;

import com.google.gwt.core.client.GWT;
import com.google.gwt.event.dom.client.HasClickHandlers;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Anchor;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.HasOneWidget;
import com.google.gwt.user.client.ui.Widget;
import com.nhim.cms.admin.client.eldf.ui.ElementDefinition;
import com.nhim.cms.admin.client.eldf.ui.ElementDefinitionList;
import com.nhim.cms.admin.client.ctype.ui.ContentType;
import com.nhim.cms.admin.client.customwidget.ui.CustomWidgetList;

public class NhimCMSAdminShell extends Composite {
	
	interface NhimCMSAdminShellUiBinder extends
	UiBinder<Widget, NhimCMSAdminShell> {
}

	private static NhimCMSAdminShellUiBinder uiBinder = GWT
			.create(NhimCMSAdminShellUiBinder.class);

	

	/**
	 * The button used to show the Dash boards.
	 */
	@UiField
	Anchor dashboardsButton;

	/**
	 * The button used to show the System Administration Menu.
	 */
	@UiField
	Anchor administrationButton;

	@UiField
	Anchor contentPagesButton;

	@UiField
	Anchor assetsButton;

	@UiField
	SlidingPanel slidingPanel;
	
	@UiField(provided = true)
	final LoginWidget loginWidget;
	
	@UiField(provided = true)
	final NhimCMSAdminTreeMenu treeMenu;
	
	@UiField(provided=true)
	final Dashboards dashboards;
	
	@UiField(provided=true)
	final ElementDefinition elementDefinition;
	
	@UiField(provided=true)
	final ElementDefinitionList elementDefinitionList;
	
	@UiField(provided=true)
	final CustomWidgetList customWidgetList;
	
	// 2011/3/26 HUNG ADD START
//	@UiField(provided=false)
	final ContentType contentType;
	// 2011/3/26 HUNG ADD START
	
	public NhimCMSAdminShell(LoginWidget loginWidget
		,GroupWidget groupWidget
		,NhimCMSAdminTreeMenu treeMenu
		,Dashboards dashboards
		,ElementDefinitionList elementDefinitionList
		,ElementDefinition elementDefinition
		,ContentType contentType
		,CustomWidgetList customWidgetList) {
		this.loginWidget = loginWidget;
		this.treeMenu = treeMenu;
		this.dashboards = dashboards;
		this.elementDefinition = elementDefinition;
		this.elementDefinitionList = elementDefinitionList;
		this.customWidgetList = customWidgetList;
		// 2011/3/26 HUNG ADD START
		this.contentType = contentType;
		// 2011/3/26 HUNG ADD END
		initWidget(uiBinder.createAndBindUi(this));
	}

	public HasOneWidget getPanel() {
		return slidingPanel;
	}
	public NhimCMSAdminTreeMenu getTreeMenu()
	{
		return this.treeMenu;
	}
	public LoginWidget getLoginWidget()
	{
		return this.loginWidget;
	}
	public HasClickHandlers getAdministrationButton()
	{
		return this.administrationButton;
	}
	public HasClickHandlers getContentPagesButton()
	{
		return this.contentPagesButton;
	}
	public HasClickHandlers getDashboardButton()
	{
		return this.dashboardsButton;
	}
	public HasClickHandlers getAssetsButton()
	{
		return this.assetsButton;
	}
	public ElementDefinition getElementDefinition()
	{
		return this.elementDefinition;
	}
	public ElementDefinitionList getElementDefinitionList()
	{
		return this.elementDefinitionList;
	}
	// 2011/3/26 HUNG ADD START
	public ContentType getContentType() {
		return this.contentType;
	}
	// 2011/3/26 HUNG ADD END
	
	
	public CustomWidgetList getCustomWidgetList()
	{
		return this.customWidgetList;
	}
}
